The Document Object Model and JavaScript > The document object model in Dreamweaver > Properties and methods of comment objects

 

Properties and methods of comment objects

Each HTML comment is represented by a JavaScript object. The following table lists the properties and methods of comment objects in Dreamweaver, along with explanations where appropriate. A bullet (·) marks read-only properties.
Property or method Return value and explanation

nodeType ·

Node.COMMENT_NODE

parentNode ·

The parent tag.

childNodes ·

An empty NodeList.

data

The text string between the comment markers (<!-- and -->).

hasChildNodes()

false